import http from '@/utils/http'

const baseURL  = '/index'

/**
 * 提交订单
 */
export function createOrderApi(data) {
  return http.post(baseURL + '/createOrder', data, { custom: { loading: true } });
}

/**
 * 获取订单列表
 */
export function orderListApi(data) {
  return http.get(baseURL + '/orderList', data, { custom: { loading: true } });
}

/**
 * 获取订单详情
 */
export function orderDetailApi(data) {
  return http.get(baseURL + '/orderDetail', data, { custom: { loading: true } });
}

/**
 * 取消订单
 */
export function cancelOrderApi(data) {
  return http.post(baseURL + '/cancelOrder', data, { custom: { loading: true } });
}

/**
 * 确认收货
 */
export function confirmOrderApi(data) {
  return http.post(baseURL + '/confirmOrder', data, { custom: { loading: true } });
}